#ifndef BELLMAN_H
#define BELLMAN_H

#include <vector>
#include <valarray>
#include <iostream>
#include <string>

#include "struct.h"
#include "zadacha.h"

tfun int bellman (struct files names, tout struct oresults ores);


std::valarray<double> bellman_init (input& data, std::string intxt, double &delta, std::valarray<double> w_oc, bool seek_oc, double step);
std::vector<double> next_w (int n, int from, int to, std::vector<double> u_cur, std::vector<double> u_beg,
                            std::vector<double> u_fin, std::vector<double> u_step);
void print_result (std::ofstream &itog, std::vector<double> tra, std::vector<double> w, double phi);
std::valarray<double> mu (double t0, double t1, std::valarray<double> x, std::vector<double> u, input &data);
void rk4 (double t, double tI, double tF, double th, double* x, std::vector<double> u, input &data);



#endif /*BELLMAN_H*/
